debugging [2][1] loop bug