added script to remove duplicates from an array