using patterns to route request