detection of flow direction)