modify code for dashboard