now implementing statistics