improve validate usage