 M: minnesota withholding ( salary w4 collector -- x )
     [ adjust-allowances ] 2keep marriage-table tax ;
 
-TUPLE: total ;
-INSTANCE: total collector
+: employer-withhold ( salary w4 collector -- x )
+    [ withholding ] 3keep
+    dup federal? [ 3drop ] [ drop <federal> withholding + ] if ;
 
-! Totals
-M: total net ( salary w4 collector -- x )
-    >r dupd r>
-    [ withholding ] 3keep
-    drop <federal> withholding + - ;
-
-M: total withholding ( salary w4 collector -- x )
-    >r >r dup r> r> net - ;
+: net ( salary w4 collector -- x )
+    >r dupd r> employer-withhold - ;

    [ fica-tax ] 2keep
    medicare-tax + + ;

M: federal net ( salary w4 collector -- x )
    >r dupd r> withholding - ;


! Minnesota
: minnesota-single ( -- triples )

MIXIN: collector
GENERIC: adjust-allowances ( salary w4 collector -- newsalary )
GENERIC: withholding ( salary w4 collector -- x )

TUPLE: tax-table single married ;

