minor changes - added check for data.table