Add query and finish validation