One function for both Master and Slave configurations.