some rewriting of instructions