add copy method to hashmap