clean up, add in category handling