refactor the dashboard