move filter template to js