 extension SDPath : RangeReplaceableCollectionType {
     
     public mutating func append(x: SDPathCommand) {
-        segment.append(x)
+        commands.append(x)
     }
     
     public mutating func appendContentsOf<S : SequenceType where S.Generator.Element == SDPathCommand>(newElements: S) {
-        segment.appendContentsOf(newElements)
+        commands.appendContentsOf(newElements)
     }
     
     public mutating func removeLast() -> SDPathCommand {
-        return segment.removeLast()
+        return commands.removeLast()
     }
     
     public mutating func popLast() -> SDPathCommand? {
-        return segment.popLast()
+        return commands.popLast()
     }
     
     public mutating func reserveCapacity(minimumCapacity: Int) {
-        segment.reserveCapacity(minimumCapacity)
+        commands.reserveCapacity(minimumCapacity)
     }
     
     public mutating func removeAll(keepCapacity keepCapacity: Bool = false) {
-        segment.removeAll(keepCapacity: keepCapacity)
+        commands.removeAll(keepCapacity: keepCapacity)
     }
     
     public mutating func replaceRange<C : CollectionType where C.Generator.Element == SDPathCommand>(subRange: Range<Int>, with newElements: C) {
-        segment.replaceRange(subRange, with: newElements)
+        commands.replaceRange(subRange, with: newElements)
     }
     
     public mutating func insert(newElement: SDPathCommand, atIndex i: Int) {
-        segment.insert(newElement, atIndex: i)
+        commands.insert(newElement, atIndex: i)
     }
     
     public mutating func insertContentsOf<S : CollectionType where S.Generator.Element == SDPathCommand>(newElements: S, at i: Int) {
-        segment.insertContentsOf(newElements, at: i)
+        commands.insertContentsOf(newElements, at: i)
     }
     
     public mutating func removeAtIndex(i: Int) -> SDPathCommand {
-        return segment.removeAtIndex(i)
+        return commands.removeAtIndex(i)
     }
     
     public mutating func removeRange(subRange: Range<Int>) {
-        segment.removeRange(subRange)
+        commands.removeRange(subRange)
     }
 }
 

            return self
        }
        var _path = SDPath()
        self.apply { segment, state in
            switch segment {
            case let move as SDPath.Move:
                
                _path.append(SDPath.Move(transform * move.point))
                
            case let line as SDPath.Line:
                
                _path.append(SDPath.Line(transform * line.point))
                
            case let quad as SDPath.QuadBezier:
                
                _path.append(SDPath.QuadBezier(transform * quad.p1, transform * quad.p2))
                
            case let cubic as SDPath.CubicBezier:
                
                _path.append(SDPath.CubicBezier(transform * cubic.p1, transform * cubic.p2, transform * cubic.p3))
                
            case let close as SDPath.ClosePath:
                
                _path.append(close)
                
            default: break
            }
        }

    
    public var boundary : Rect {
        var bound: Rect? = nil
        self.apply { commands, state in
            switch commands {
            case let line as SDPath.Line:
                if bound == nil {
                    bound = line.bound(state.last)
