change dmmgraphs into function for use with dynare