new version to fix file permissions, in #7