added contains_key function for hash map