tests and query changes