finished view-mode logic