implemented insertAndSplit