[solved] traffic light code

i want it to go yellow, red, red and yellow, green in a cycle with the pedestrian red light on but if i press the button when green it should go yellow, red and pedestrian green, then flash the yellow and pedestrian green before returning to normal.