update RuleFunction and CollisionDetectAlgorithm
update rulefunction and collisiondetectionalgorithm