added plotting macro