Optimise gen1 and gen2