dealing with the errors