Hashmap Implementation Problem