Added first and next functions to hash map