create dataFilter and displayData functions