quer UI: partial works
refactor query code
partial query