added comments to code of core.py