before try to update UI