improved broker impl and example