implemented contains() method and distinct() method for array;