fix #1: NameError: global name 'filterlist' is not defined