half of the traffic algorithm