modified hashmap

change put to putIfAbsent