2 loops working