added split
tried some funky stuff with flatMap, but stopping for now