added export_fig to codes