Add weighted option, extract brc method.