fixed a doctest
fixed some PEP8 (indentation) errors