call encode method
add decoder