refactor base twig