remove useless encode method