solve conditional loop