chnage to encode