added value comparison to subsetting and data grabbing function for dependent and independent vals