added new iterate method and test