Added a simple iterator function