add hashmap solution