added the documentation and indentation to the code  #151