added basic tokenize function for general use