merged ui with logic