added comments to tool.py