Fixes bug regarding split, var need to be outside
function
Merge pull request #9 from joshjeong/bug/split

Fixes bug regarding split, var need to be outside