fix redirect. add default sort and add ability to change sort order