making better use of twig