swapped data.table for dply