tests for opcodes
Refactoring