Update simulation loop