move error outside of updateUI