Stats calculation added