fix fitness function