reduce usage of getFlow()