removed unnecessary bytes.buffer and io.Copy