wrote hash map and tests