added boilerplate code for emulateCycle()