cleaned up sendgrid stats code #9