Added if statements for the tabs