       expression: _.map(@expression, (it)-> it.clone())
       is_error: @is_error
       is_open: @is_open
-    @klass.build(_.extend({}, data, new_vals))
+      id: @id_value
+    other = @klass.build(_.extend({}, data, new_vals))
+    other
 
   # returns part of an expression
   last: (from_end=0)->

#= require lib/math/base

class ExpressionComponent
  isOperator: -> false
  isNumber: -> false
  preceedingSubexpression: -> false
  clone: -> @ # by default, cloning does nothing

class Equals extends ExpressionComponent
  toString: -> "="


  isPowerOpen: -> @power().isOpen()

  subExpressions: ->
    [@base(), @power()]

  clone: (new_vals={})->
    data =
      base: @base().clone()
      power: @power().clone()
      id: @id_value
    other = @klass.build(_.extend({}, data, new_vals))
    other
ttm.class_mixer(Exponentiation)

class Pi extends ExpressionComponent
