add solution for remove dup from array