alignment and tablesorting

added table sorting features