switch to "valid()" style api