Implemented column sorting