combine and optimise the different hash types