added: encode