split plot_msn into get_msn and plot_msn function