modifications to query