add comments to better understanding