added UART write function