add stats endpoint
add test on stat generation