Function of iodine in gram staining?

iodine act as a mordant..on the gram positive bacteria which got really thick and abundence of peptidoglycan layer, the crystal violet will fix to the peptidoglycan layer..meanwhile in gram negative bacteria which is lack of peptidoglycan layer, the alcohol or acetone will wash it away