Added bytesToAppend method