added setuptools and refactored into dir module