refactoring ConditionExtension to ConditionFunctionExtension