Adding proper comments to the code