add twig function and change default server url