added templates and session variables set