adjusted code to respect new traffic features