switch stop-condition to be a keyword argument