improved tokenizing