debuggin new version of gexpmq_mex.cpp