custom twig function working