use dataBytes for number of bytes to memcpy