Getting a simulation class to work