small change to problem loop