clean up some code for dashboard