Flesh out body of tokenize function