pep8 added and all formatting errors fixed
added docstrings. fixed spacing bug.
merging in pep8 branch with pep8 implemented