change rules to static function