hash_function with 3 params