Added comments in the code