tests for query + data / minor reformatting