finished hashmap implementation