remove duplicate from an array