Edited core.cpp