fix entry point for setuptools, fix main function