refactored run_instructions method