update mod.cpp to v1.4