Changed duration to use timedelta