New version, with working flow stats