normalize query response