small refactor on timedelta usage