prepare to find duplicate keys