iterator implementation for tokens