remove the duplication of array