now with refactored workflow