protected function processRoutes($request, $response)
    {
        $method = strtoupper($request->get('method'));
        
        //if no routing on this
        if (!isset($this->routeMiddleware[$method])
        || !is_array($this->routeMiddleware[$method])) {
            return false;
        }
        
        $args = array($request, $response);
        $path = $request->get('path', 'string');
        
        //determine the route
        foreach ($this->routeMiddleware[$method] as $route) {
            $pattern = $route[0];
            $callback = $route[1];
            
            $regex = str_replace('**', '!!', $pattern);
            $regex = str_replace('*', '([^/]*)', $regex);
            $regex = str_replace('!!', '(.*)', $regex);
            
            $regex = '#^'.$regex.'(.*)#';
            if (!preg_match($regex, $path, $matches)) {
                continue;
            }
            
            //get dynamic variables
            $variables = $this->getVariables($matches);
            
            //and stuff it in the request object
            $request->set('variables', $variables);
            
            //bind callback
            $callback = $callback->bindTo($this, get_class($this));
            
            //call the callback
            //and keep going unles they say explicitly to stop
            if (call_user_func_array($callback, $args) === false) {
                break;
            }
        }
        
        return true;
    }