     ///
     /// - Returns: a RouterElement instance
     ///
-    init(method: RouterMethod, pattern: String?, middleware: RouterMiddleware) {
+    private init(method: RouterMethod, pattern: String?, middleware: [RouterMiddleware]) {
 
         self.method = method
         self.pattern = pattern
         self.regex = nil
         self.keys = nil
-        self.middleware = middleware
+        self.middlewares = middleware
 
         SysUtils.doOnce(&RouterElement.regexInit) {
             do {

    ///
    /// The middleware to use
    ///
    private var middleware: RouterMiddleware

    ///
    /// initializes a RouterElement

    /// - Parameter next: the closure for the next execution block
    ///
    private func processHelper(request: RouterRequest, response: RouterResponse, next: () -> Void) {
        for middleware in middlewares {
            middleware.handle(request, response: response) { () in
                request.params = [:]
                next()
            }
        }
    }

