fix loops again