modified code to remove exact duplicate records before filling overflow buckets