Implemented /stats and test cases