Ending iteration part. Not tested yet.