Reindenting and also put in constraint for the simulation to stop after actual position reaches 0 instead of relying on a specific time step