added master_addr parameter