split BB: encapsulate all splitting in function splitFunction