improved low-level validation