added error messages for search