added a way to spec different fitness scheme and implemented the two most common: minimization and maximization