refacto twig