updated opengoo.cpp