update encoder and decoder test