testing loop using for