changes to core.py