add multipanel plotting, refactor