looping pitfall