update according to code review
Add optional query parameter matcher