Updated code for multi-cast