added new methods to find the duplicated values and more tests