fix #31
update iterator and callback function made optional
Merge pull request #32 from valorkin/issue_#31

fixes #31