added comments to custom.py