correct smj.cpp