repeated definition of filterSettings object  (line 7 as well) - turn into function