completed the logic allowing for the identification of the master host