edited run flow in main