serial flow control implementation