update trackOutBound function in javascript