update the UI and some small functions