added counter to filter