Implement iter_sm()