fixing code iter type