added rehashing for hash_map when array gets too full