Fitness function implemented.