added session functions for twig