add new code for write read uart