iterative code and tags code , tags code needs modification