Added table head sort