Implemented the simulation mode