add tokenize function
code cleanup
minor change