added error handling to 'show'