updated query lib
fixed code style as per query standards