corrected validator