added upstream to config and support for stats with same token