spliting function