Refactoring wf-example