minor refactors / add total_seconds util