Added table sorting