added simple error handling