added code for the run_live