added the filtering