Wrote a simple tokenizing function