unify encoder and decoder input arguments