first addition of the macro for plot