implementing ed opcodes