flow stats script
rename vars and fix a todo
fix typo in production