Updated trafic light to query the database
Updated trafic light to query the database