test with loop