more error message and validation changes