re-sort argument in controller function