refactor data processing. add category add/remove