grouped string chars in a token and added complex if script