implementation of FillWith(..) and ApplyFilter(..) extension methods