add core.cpp