add setOpcode method