optimise fragments