moved update outside of except