simplified implementation of 'stop'