added CRC, appended necessary control characters