add twig function
update documentation