add loop corner case TODO
support real token loops