twig implementation