sorted tables and attributes minus sessionhandling