merge in changes from branch "multi_query"