Part of factory working - secondsToMinutes function