updated PEP8 compliant script and library