Changed hashing function for strings