refactoring twig types to allow custom variables