add segmented implementation, fix "mono" implementation