added str method to P3 class
pep8 formatter updated