creating a flexible driver to use various hash functions