updated layout using templating engine