Added ability to specify a subset of variables to use