updated sort click event and added ability to specify class of table