Change simulation to class.