expanded tests and added error messages