require encoder too