Code of two iteration