added broadcasting code