Added changeTab function for tab navigation