implement the split operation