possibly we are copying the bytes twice here.
It could be fine, just a reminder to check here if perf improvements are needed in the future.