added query trimming
Merge remote-tracking branch 'origin/master'