can find position of duplicate value