added error handling for no results