Added observer pattern in UI