added error messages to create hash table function