factor out ui component as another branch