start of implementation of _wsgi_stats (still broken)