FIXED: put an i loop in an i loop and logic failed