Update index.js

Added the option to load filter functions