Added matching logic.
Use route's matching logic rather than implement it inside listen function.