Modified document to add conditional if (timeoftrip).