moved sort out of view, into controller, to allow selecting first list item after sort