refactor comment rest api