second traffic-light implementation