   [x op exp1 exp2] 	
   	(let [e1 (munch exp1)
   			  e2 (munch exp2)
-  			  d (Temp (minijava.ir.temp.Temp.))]
+  			  d (tm/temp)]
   			 	(emit (movl  e1 d))
   			 	(emit (addl  e2 d))
   			  d))

(defmethod munchMap [:minijava.ir/Const java.lang.Integer]
  [x value] 	
  	;;Const(i) -> Movl $i Temp 
  	(let [d (Temp (minijava.ir.temp.Temp.))]  				
  				 (emit (movl (CONST value) d))
  				 d)) ;;Since Mem is an expression, it returns a temp.


 ;;Subtraction
(defmethod munchMap [:minijava.ir/BinaryOp :- :minijava.ir/Const  :minijava.exp/expression] ;;first exp - second exp
 [exp op rand1 rand2]       
  (let [d (tm/temp) ]
  		 	(emit (movl  (CONST (:val rand1)) d))
        (emit (subl  (munch rand2) d  ))
                    d))

(defmethod munchMap [:minijava.ir/BinaryOp :- :minijava.exp/expression :minijava.ir/Const ] ;;first exp - second exp
  [exp op rand1 rand2]    
  (let [d (tm/temp) ]
  		 	(emit (movl  (munch rand1) d))
        (emit (subl (CONST (:val rand2)) d));;note: the ordering here matters, and is different than above, because subtraction is not commutative
                    d))
