 //  limitations under the License.
 //
 
-struct OrderedSet<Element: Hashable> {
+struct OrderedSet<Element: Hashable>: RandomAccessCollection, Hashable {
     
-    typealias Index = Int
+    typealias Index = Array<Element>.Index
     
     private var elements: [Element] = []
     

    }
    
    
    var count: Int {
        
        return self.elements.count
    }
    
    
    var isEmpty: Bool {
        
        return self.elements.isEmpty
    }
    
    
    var first: Element? {
        
        return self.elements.first
    }
    
    
    var last: Element? {
        
        return self.elements.last
    }
    
    
    
    // MARK: Methods
    
    /// whether the set contains the given element.
    func contains(_ element: Element) -> Bool {
        
        return self.elements.contains(element)
    }
    
    
    /// return the index where the specified element appears in the set.
    func index(of element: Element) -> Index? {
        
        return self.elements.index(of: element)
    }
    
    

    }
    
    
    
    // MARK: Collection Methods
    
    /// return the element at the specified position.
    subscript(_ index: Index) -> Element {
        
