use limit instead of count in applyFilter