added missing optional reply.
added basic input/output to Simulator.