uploaded baseline code for computing flow.