added part of filter dataset function