how does traffic signal controller work