refactor dpe controller.