 
 (defn perform-tgl
   [{[operand] :operands} {:keys [instructions] :as state}]
-(let [instruction-index (+ (:next state) (resolve-value operand state))
-      new-instructions (if
-                         (contains? instructions instruction-index)
-                         (update instructions instruction-index toggle-instruction)
-                         instructions)]
-  (-> state
-      (assoc :instructions new-instructions)
-      (move-next))))
+  (let [instruction-index (+ (:next state) (resolve-value operand state))
+        new-instructions (if
+                           (contains? instructions instruction-index)
+                           (update instructions instruction-index toggle-instruction)
+                           instructions)]
+    (-> state
+        (assoc :instructions new-instructions)
+        (move-next))))
 
 (defn perform-cpy
   [{[op1 op2] :operands} state]

         move-next)
    (move-next state)))

(defn perform-jnz
  [{[op steps] :operands} state]
  (let [steps-value (resolve-value steps state)

    "dec" (perform-dec operation state)
    "jnz" (perform-jnz operation state)
    "tgl" (perform-tgl operation state)
    "mult" (perform-mult operation state)
    (throw (Exception. (str "Unknown operation" operation)))))

(defn execute-instructions
