refactured flow data to angular