a neater code that keeps stats