factor cb parsing out of cb algorithms