use controller to replace routes