add visit to SmartIterator