cleanup and small modify
? add flow_2 main.cpp ???