anchor.diff:  
     if (alpha < 1.0e-10_real64) then
        ! if alpha == 0.0 (no pseudocounts)
  -     call plugin(n, hist, estimate)
  +     call plugin(n, counts, estimate)
        return
     end if
   
  -  nbins = size(hist)
  +  nbins = size(counts)
     if (nbins == 1) then 
        estimate = 0.0_real64
        return
     end if
  -  ndata = sum(hist)
  +  ndata = sum(counts)
     estimate = 0.0_real64
     do i = 1,nbins
  -     ni = hist(i) + alpha
  +     ni = counts(i) + alpha
        estimate = estimate - ni*log(ni)
     end do
     ! correct for the (nc - nbins) bins with frequency alpha
  
positive.code: 
  end module nsb_mod
  
  subroutine plugin(n,hist,estimate)
    ! plugin estimator - no prior, no regularization 
    use iso_fortran_env
    implicit none
  
    integer(int32), intent(in) :: n
    integer(int32), intent(in) :: hist(n)
    real(real64),  intent(out) :: estimate
  
    integer(int32) :: nbins
  
negative.code:     end do
      deallocate(multiplicities)
      
    end subroutine compute_multiplicities
  
    subroutine dirichlet_finalize()
  
  