refactor wfs processor