rule functionality added
More functionality for rules