refactoring; integration of wfs