slight tweak to allow importing as a module, with a run function/method