improve query gui