fix rule based fitness function