change controller for the function of sort