loops 3-7