match routes a little more efficiently