such an amazing way of using hashmap.