Who did not unit the two principalities?