added iterative PMR code