changed the return type to Iterable instead of Iterator