     @objc private func selectDay(sender : AnyObject) {
         
         if (singleSelection == true) {
-            for (index, element) in daysButton.enumerate() {
-                setInActive(daysButton[index])
+            for (index, element) in daysButton.enumerated() {
+                setInActive(tuple: daysButton[index])
                 daysButton[index].selected = false
             }
         }

        daysButton.removeAll()
        
        self.daysLabel.forEach { currentDay in
            let button = UIButton(frame: CGRectMake(CGFloat(position) * itemWidth, 0, itemWidth, itemHeight))
            let layer = CALayer()
            let tuple = CHButton(button, false, layer)
            
            configureButton(tuple, title: currentDay, position: position)
            configureLayer(tuple)
            daysButton.append(tuple)
            
            if position == defaultSelectedDay {
                selectDay(button)
            }
            
            position += 1

        
        switch daysButton[sender.tag].selected {
        case true:
            selectDayAtPosition(position: sender.tag)
        case false :
            deselectDayAtPosition(position: sender.tag)
        }
        self.delegate?.didSelectDay(position: sender.tag, label: daysLabel[sender.tag], selected: daysButton[sender.tag].selected)
    }
    
    public func selectDayAtPosition(position : Int) {
        if self.daysButton.count > position && position >= 0{
            self.daysButton[position].selected = true
            self.daysButton[position].button.setTitleColor(selectedTitleColor, for: .normal)
            self.daysButton[position].selectedLayer.backgroundColor = selectedBackgroundColor.cgColor
        }
    }
    
    public func deselectDayAtPosition(position : Int) {
        if self.daysButton.count >= position {
            self.daysButton[position].selected = false
            self.daysButton[position].button.setTitleColor(titleColor, for: .normal)
            self.daysButton[position].selectedLayer.backgroundColor = UIColor.clear.cgColor
        }
    }
    
    private func setActive(tuple : CHButton) {
        tuple.button.setTitleColor(selectedTitleColor, for: .normal)
        tuple.selectedLayer.backgroundColor = selectedBackgroundColor.cgColor
        
    }
    
    private func setInActive(tuple : CHButton) {
        tuple.button.setTitleColor(titleColor, for: .normal)
        tuple.selectedLayer.backgroundColor = UIColor.clear.cgColor
    }
}

