proper identification of columns in sort