Added comments to the code, should be good to go
However, I'm getting an error while compiling. Can you look into it?