refactored flow, moved bean definition to annotations