moved broker init into proper location