updated for new plotting