more work on query