run the script both directly and from setuptools installation
minor adjustments