changed to Pillow, fixed pep8 errors