add comments to almost all functions