Added additional comments in the code