Added a method to check the objective functions