feature selection optimisation function