retooled the runlogic and runview functions