update and clear up