filter works with templates