Adding first iteration code.