Implementation of rule's model