Replacing address with hashmap