new plotting function

some updates