adding implication and generalization engine code