   }
   
   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 {


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

        delegate.tags.insert("", atIndex: idx)
        let indexPath = NSIndexPath(forRow: idx, inSection: 0)
        collectionView.insertItemsAtIndexPaths([indexPath])
        
        UIView.animateWithDuration(0.2, animations: { () -> Void in
          self.collectionView.scrollToItemAtIndexPath(indexPath, atScrollPosition: .CenteredHorizontally, animated: false)
        }, completion: { (complete) -> Void in
          if let cell = self.collectionView.cellForItemAtIndexPath(indexPath) as? tagCell {
            cell.textField.becomeFirstResponder()
          }
        })
        return false
      }
    }
