finished ch06, UI components