allow configurable hash function