much^n easier way of subplotting via a function