make applyToAllRigidBodyElements method to cleanup all of the loops hanging around in RBM