Updated hash function so code compiles