renamed getUniqueIndex to getUniquePosition