add encode send interface