more changes to plot macro