   getGroup: -> @tessellation.group
   getTransitionFunc: -> @transitionFunc
 
-  initialize: ->
-    @tessellation = new Tessellation 7,3
+  initialize: (config = new DefaultConfig)->
+    [n,m] = config.getGrid()
+    @tessellation = new Tessellation n, m
     console.log "Running knuth-bendix algorithm...."
     rewriteRuleset = knuthBendix vdRule @getGroup().n, @getGroup().m
     console.log "Finished"    
     @appendRewrite = makeAppendRewrite rewriteRuleset
     @getNeighbors = mooreNeighborhood @getGroup().n, @getGroup().m, @appendRewrite
 
-    @cells = new NodeHashMap
-    @cells.put unity, 1
+    cellData = config.getCellData()
+    if cellData
+      console.log "import: #{cellData}"
+      @importData cellData
+    else
+      @cells = new NodeHashMap
+      @cells.put unity, 1
     
     @observer = new @ObserverClass @tessellation, @appendRewrite, minVisibleSize
     @observer.onFinish = -> redraw()

    updateCanvasSize()
    if found > 0
      @navigator.navigateToResult 0
    

updateCanvasSize = ->
  return if canvasSizeUpdateBlocked

    @animator = new Animator this
    @paintStateSelector = new PaintStateSelector this, E("state-selector"), E("state-selector-buttons")

    @transitionFunc = parseTransitionFunction config.getFunctionCode(), application.getGroup().n, application.getGroup().m
    @lastBinaryTransitionFunc = @transitionFunc


