implement splitter (closes #35)