Add capabilities for customizable stopping criterion