updates UI and some bug