filter forms factored out a bit