modifications in core.py