optimisation of sla selector scripts