Added comments and docstrings.
added doc strings
doc strings