Just wasted two hours trying to construct a hashing function