add filter function on main page