add the rule loader
test completed. fix some erratas