have to fix opt.cpp