added comments to lib.py file