new plotting function added