basic table with sort function done