updated piwrapper and combinedwrapper