management of duplicate keys