add master and slave functionality