Improving filter performance
Removing costly loop