modified the dynamics simulation