first valid query