add construction by iterator pair
update sample codes