updated new rest controller.