modfiication of tplPest to consider head optimisation