Created encoder and decoder