public plot function added