update the main file for plotting