calling the right valid? function helps