Refactored until wf tasks exercise