look at notes in run.cpp