moved broadcast function