add velidation on query