added conditions to arrival and departure times