Update core.py