timedelta.total_seconds() instead of timedelta.seconds everywhere