fixed core.py