implemented dinstinct() method for list