changes in loop structure