with hashmap