Adding code for blackbox Iterator Pattern