deal with err