oops. fix and improve validation.