refactor pm() and vip()