made graphpmf take subset of cost instead of full data set