Use the main code from the simulator