added error messages in constructor