reorganizing the twig pattern engine rule