next task fixes and optimisation