better handling uart