working version of run_takeaway