Adding support for master / slave