change method of checking rule satisfaction