port to python 3 & add configuration file