filters data by independent variable