added a plot making macro