implemented executeInstruction()