wrote more stuff for simulation