Added documentation for the code