loop returns seconds as well