update for error handling