added a split function