add simple error handling and response