fitness function signature changed a bit; some minor changes to make the code compile