added functionality to reset simulation. fixed bug in socketupdate