Add support for multiple masters