Jan Hugo Prins' helper script imported (and patched)