update to madlib.cpp