add if __name__ == main to avoid weird sphinxdoc / autodoc conflict