refactor taxonomy rest api