Define classes to do statistics