Red-light system tracks cars, can delay green to avoid accidents