add documentation and some fix for pep8