added function to simulate one step