add objectToQuery function and the test