added option to use historical flows