more changes to core.py