Add support for master/slave