                                                                      (push-item input :string 
                                                                                 (make-push-state))))
                                     top-string (top-item :string final-state)
-                                    desired-output (let [short (clojure.contrib.string/butlast 2 input)]
+                                    desired-output (let [short (.substring input 0 (max (- (count input) 2) 0))]
                                                      (str short short))]
                                 (if (not (string? top-string))
                                   1000

  (if (empty? s)
    nil
    (if (= (first s) c)
      (clojure.contrib.string/drop 1 s)
      (let [remain (string-remove-char (clojure.contrib.string/drop 1 s) c)]
        (if (nil? remain)
          nil
          (str (first s) remain))))))

    (let [first-char (first s1)
          remove-from-s2 (string-remove-char s2 first-char)]
      (if (nil? remove-from-s2)
        (inc (string-char-counts-difference (.substring s1 1 (count s1)) s2))
        (string-char-counts-difference (.substring s1 1 (count s1)) remove-from-s2)))))
      

(define-registered in 
