Changed splitter function from arrays to ranges