how the get method works in a hashmap