update error handleing