Changed code so it can do multicast sending