calculate flow hash properly