refactor all controller