some tweaks to make plots more general