Update PMF_core.cpp