implemented serial port output