ppwcode utility code, for which we didn't know a better place at the time