optimisation and code review