basic functionalities of rule pattern