simplify calculation of seconds