updates UI and functionality