added data.table sorting