changed resolve step to add more iteration for self collisions