better handling of plots