sorting of tables now works in ASC and DESC order