Adding query validation ability.