modified/fixed fitness function