Remove duplicate data in array
Compiled OK on MAC OS