replaced the total_seconds method