Added $counter++ for removing duplicates...