Improving filter calculations