Updated fitness function.