Changed HPI run function