updated for master slave arch