add comments to each function