Optimisation of the eta_tracking function