add /v2/stats

What is the purpose of these? They are only used once below. Please just inline them.