added the split function