encoding message improved