now works for multiple plot by vals