added missing code from template