added procedure pseudo-code for run()