adding user query framework