 collections = []
+shapes = ['circle','square','hex']
+next_shape = 0
 
 # keyboard input
 pendingString = ''


    if collections.length < 1 or
       not (collections[collections.length-1] instanceof CodeListCollection)
      collection = new CodeListCollection(shape)
      collections.push(collection)
    else
      collection = collections[collections.length-1]

        else
          letters[c] = 1

    collection = new NodeCollection(shapes[next_shape])
    next_shape = (next_shape + 1) % shapes.length
    collection.addLeaves( letters, pos )
    collections.push(collection)

