converted dashboardState service to DashboardState factory