   }
   
   func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-    return delegate.tags.count+1
+    return delegate.tags.count
   }
   
   func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {

        delegate.tags.insert("", atIndex: idx)
        let indexPath = NSIndexPath(forRow: idx, inSection: 0)
        collectionView.insertItemsAtIndexPaths([indexPath])
        let cell = collectionView.cellForItemAtIndexPath(indexPath) as tagCell
        cell.textField.becomeFirstResponder()
        return false
      }
    }


class TagDelegate: TagProtocol {
  private var tags: [String] = [String]()
  private var tagDelegate: TagCollectionViewDelegate!
  private var tagDataSource: TagDataSource!
  var currentIndex: Int = 0
  
  convenience init(tags: [String]) {
    self.init()
    var temp = tags
    temp.append("")
    self.tags = temp
  }
  
  func setupDelegateAndDataSource(collectionView: UICollectionView) -> (delegate: TagCollectionViewDelegate, dataSource: TagDataSource) {
    tagDelegate = TagCollectionViewDelegate()
    tagDelegate.delegate = self
    tagDataSource = TagDataSource(collectionView: collectionView)
    tagDataSource.delegate = self
    return (tagDelegate, tagDataSource)
  }
  
  func getTags() -> [String] {
