more algorithm planning within decoder class