removed use of session variables for sort