error handling update and return values