This value is used in multiple places in this method so it can be stored in a var.