trying to resolve loop issues