iterator hw

finished the hw