Add encoder for composing