updates ui on init and changes