changing the ser.write