realise opcode function