use todos array controller to handle sorting