add a global variable to store filter