replace smarty with twig