working on fixing the split function - still a bit broken, but mostly there