refactor works-filter.js