before chaing sort location