fix up return types in BString
brand new knucleotide version ported from scala