Added comments to develop algo