add lock around adding iterator