fixed indentation and exposes stats object