fix wrong lib and make the code more pep8 ...