add views and segmented control for switching view