Added element iterator and test case