Got the code working. Need to fix the travel time and create the downstreamID = 0 exception case.