took out reference to selectedTab