factor out ui components