adding a json serializer for the stats
correcting the test