fixed the filter and token factories