Using HashMap instead of HashTable