added view-switching