added docstring to main function.