cleaned up the run flow

added static factory methods