added query details service
move small things around