fixed #1 splitter code and unit tests