update core.py