changed IsValid to Valid