first working implementation of define-opcode stuff