Creating Simulator class and modifying main