add support for other formats of serial data in read_raw