add new statistics code