clean up. replace [NSData getBytes] with memcpy()