         @refreshWidgets()
 
         # add fields widgets to a layer
-        @layer = new Kinetic.Layer
+        @fieldsLayer = new Kinetic.Layer
         for x in [0..@board.size-1]
             for y in [0..@board.size-1]
-                @layer.add @board.fields[x][y].widget.group
-
-        @layer.add @topBarWidget.group
-
-        @stage.add @layer
+                @fieldsLayer.add @board.fields[x][y].widget.group
+
+        # add bars to separated layer
+        @barsLayer = new Kinetic.Layer
+        @barsLayer.add @topBarWidget.group
+
+        # create next layers only for animations (better performance)
+        @animLayer = new Kinetic.Layer
+
+        @stage.add @fieldsLayer
+        @stage.add @barsLayer
+        @stage.add @animLayer
+
+    moveFieldToLayer: (field, toLayer) ->
+        # moves field to new layer
+        fromLayer = field.widget.group.getLayer()
+        field.widget.group.moveTo(toLayer)
+        # refresh layers cache
+        fromLayer.draw()
+        toLayer.draw()
 
     getCanvasSize: () ->
         # calculate canvas size

                if field.direction == 'none'
                    field.resetRandoms()

                    tweens.push new Kinetic.Tween
                        node: field.widget.group
                        opacity: 1
                        duration: TWEEN_DURATION

        @refreshWidgets()

        if tweens.length > 0
            tweens[0].onFinish = () =>
                @finishMove()

            for tween in tweens
                tween.play()


TWEEN_DURATION = 0.5

delay1s = (func) -> setTimeout func, 1000

randomChoice = (values) ->
    # http://rosettacode.org/wiki/Pick_random_element#CoffeeScript
