add stopping as side-effect