optimized validation