break simulation on any condition that can be described in a function