better copyRawDataFrom() implementation