process data from a serial stream