cleaning and updating UI