split new and run functions, add tests for calls to Stop