move the default sorting to the controller to handle different situations