retrieving sleep times properly