     (interactive)
     (set-default-weight 1.0))
 
+(defun set-min-weight (s)
+    (if (and (in-view) (>= s 0) (<= s 1))
+        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability tn-max-sharability tn-default-sharability s tn-max-weight tn-default-weight)
+        (error-message
+            (concat "min weight " (number-to-string s) " is outside of range [0, 1]"))))
+
 (defun tn-decrease-min-weight ()
     (interactive)
-    (if (in-view)
-        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability tn-max-sharability tn-default-sharability (- tn-min-weight 0.25) tn-max-weight tn-default-weight)))
+    (set-min-weight (- tn-min-weight 0.25)))
 
 (defun tn-increase-min-weight ()
     (interactive)
-    (if (in-view)
-        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability tn-max-sharability tn-default-sharability (+ tn-min-weight 0.25) tn-max-weight tn-default-weight)))
+    (set-min-weight (+ tn-min-weight 0.25)))
+
+(defun tn-set-min-weight-0 ()
+    (interactive)
+    (set-min-weight 0.0))
+
+(defun tn-set-min-weight-1 ()
+    (interactive)
+    (set-min-weight 0.25))
+
+(defun tn-set-min-weight-2 ()
+    (interactive)
+    (set-min-weight 0.5))
+
+(defun tn-set-min-weight-3 ()
+    (interactive)
+    (set-min-weight 0.75))
+
+(defun tn-set-min-weight-4 ()
+    (interactive)
+    (set-min-weight 1.0))
+
+(defun set-max-weight (s)
+    (if (and (in-view) (>= s 0) (<= s 1))
+        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability tn-max-sharability tn-default-sharability tn-min-weight s tn-default-weight)
+        (error-message
+            (concat "max weight " (number-to-string s) " is outside of range [0, 1]"))))
 
 (defun tn-decrease-max-weight ()
     (interactive)
-    (if (in-view)
-        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability tn-max-sharability tn-default-sharability tn-min-weight (- tn-max-weight 0.25) tn-default-weight)))
+    (set-max-weight (- tn-max-weight 0.25)))
 
 (defun tn-increase-max-weight ()
     (interactive)
-    (if (in-view)
-        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability tn-max-sharability tn-default-sharability tn-min-weight (+ tn-max-weight 0.25) tn-default-weight)))
-
+    (set-max-weight (+ tn-max-weight 0.25)))
+
+(defun tn-set-max-weight-0 ()
+    (interactive)
+    (set-max-weight 0.0))
+
+(defun tn-set-max-weight-1 ()
+    (interactive)
+    (set-max-weight 0.25))
+
+(defun tn-set-max-weight-2 ()
+    (interactive)
+    (set-max-weight 0.5))
+
+(defun tn-set-max-weight-3 ()
+    (interactive)
+    (set-max-weight 0.75))
+
+(defun tn-set-max-weight-4 ()
+    (interactive)
+    (set-max-weight 1.0))
 
 ;; set sharability ;;;;;;;;;;;;;;;;;;;;;
 
 (defun set-default-sharability (s)
-    (if (in-view)
-        (if (and (> s 0) (<= s 1))
-            (setq tn-default-sharability s)
-            (error-message
-                (concat "sharability " (number-to-string s) " is outside of range (0, 1]")))))
+    (if (and (in-view) (> s 0) (<= s 1))
+        (setq tn-default-sharability s)
+        (error-message
+            (concat "sharability " (number-to-string s) " is outside of range (0, 1]"))))
 
 (defun tn-decrease-default-sharability ()
     (interactive)

    (interactive)
    (set-default-sharability 1.0))

(defun tn-decrease-min-sharability ()
    (interactive)
    (if (in-view)
        (request-view t tn-mode tn-root tn-depth tn-style (- tn-min-sharability 0.25) tn-max-sharability tn-default-sharability tn-min-weight tn-max-weight tn-default-weight)))

(defun tn-increase-min-sharability ()
    (interactive)
    (if (in-view)
        (request-view t tn-mode tn-root tn-depth tn-style (+ tn-min-sharability 0.25) tn-max-sharability tn-default-sharability tn-min-weight tn-max-weight tn-default-weight)))

(defun tn-decrease-max-sharability ()
    (interactive)
    (if (in-view)
        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability (- tn-max-sharability 0.25) tn-default-sharability tn-min-weight tn-max-weight tn-default-weight)))

(defun tn-increase-max-sharability ()
    (interactive)
    (if (in-view)
        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability (+ tn-max-sharability 0.25) tn-default-sharability tn-min-weight tn-max-weight tn-default-weight)))


;; UPDATES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; set weight ;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun set-default-weight (s)
    (if (and (in-view) (> s 0) (<= s 1))
        (setq tn-default-weight s)
        (error-message
            (concat "weight " (number-to-string s) " is outside of range (0, 1]"))))

(defun tn-decrease-default-weight ()
    (interactive)
