Loop - remove duplicate lines