improve `combine_hashes` method