add and fix coreper.cpp