trying to implement convert_plot_tochunk