Hashmap implementation and output