before optimisation