got loop for tab creation working