modify the flow algorithm, seems to be a little bit better than the other adaptive one