added traffic function