Update core.cpp