improved MyFitnessFunction