improved run()