The company, which benefited from the imperial patronage, soon expanded its commercial trading operations, eclipsing the Portuguese Estado da Índia, which had established bases in Goa, Chittagong, and Bombay, which Portugal later ceded to England as part of the dowry of Catherine de Braganza. The East India Company also launched a joint attack with the Dutch United East India Company on Portuguese and Spanish ships off the coast of China, which helped secure their ports in China. The company established trading posts in Surat (1619), Madras (1639), Bombay (1668), and Calcutta (1690). By 1647, the company had 23 factories, each under the command of a factor or master merchant and governor if so chosen, and 90 employees in India. The major factories became the walled forts of Fort William in Bengal, Fort St George in Madras, and Bombay Castle.