add comment and more tests for query handling in client and server sync