added log of binomial coefficient function