Added createArriveTime function