Adding an iterate function for hashmaps