sorting and url parameters working