add flow chart to doc