fix split; add test for split