stats pattern and documentation