added assignment method for iterator