documented all functions
fixed pep8 errors