make the hashing function configurable