refine the way to build query string
Merge remote-tracking branch 'origin/master'