update to use error messages