adding sorting feature to the grid