         addConstraint(trailingAnchor.constraint(equalTo: stackView.trailingAnchor))
     }
     
-    func setUpBorderView(_ borderView: UIView) {
-        borderView.clipsToBounds = true
-        borderView.translatesAutoresizingMaskIntoConstraints = false
-        borderView.backgroundColor = borderColor
-        borderView.addConstraint(borderView.widthAnchor.constraint(equalTo: borderView.heightAnchor))
-    }
-    
     func setUpAvatarView(_ avatarView: AvatarView) {
-        avatarView.translatesAutoresizingMaskIntoConstraints = false
         avatarView.addConstraint(avatarView.widthAnchor.constraint(equalTo: avatarView.heightAnchor))
         avatarView.borderColor = borderColor
         avatarView.innerColor = innerColor
         avatarView.textColor = textColor
+        avatarView.spacingColor = spacingColor
         avatarView.borderWidth = avatarBorderWidth
         avatarView.fontName = fontName
         avatarView.fontSize = fontSize
-    }
-    
-    func addAvatarView(_ avatarView: AvatarView, to borderView: UIView) {
-        borderView.addSubview(avatarView)
-        borderView.addConstraint(avatarView.leadingAnchor.constraint(equalTo: borderView.leadingAnchor))
-        borderView.addConstraint(avatarView.topAnchor.constraint(equalTo: borderView.topAnchor))
-        borderView.addConstraint(borderView.trailingAnchor.constraint(equalTo: avatarView.trailingAnchor))
-        borderView.addConstraint(borderView.bottomAnchor.constraint(equalTo: avatarView.bottomAnchor))
+        avatarView.outerMargin = spacing
     }
     
     func updateBorders() {

    
    fileprivate var avatars = [AvatarPresentable]()
    fileprivate var avatarViews = [AvatarView]()
    fileprivate var borderViews = [UIView]()
    fileprivate var plusAvatar = AvatarView()
    fileprivate let stackView = UIStackView()
    

    
    @IBInspectable open var overlap: CGFloat = 10 {
        didSet {
            stackView.spacing = -overlap
        }
    }
    
    @IBInspectable open var spacing: CGFloat = 2.0 {
        didSet {
            updateMargins()
        }
    }
    
