Add the split function
Urgent to handle some degeneracy