added dinvgamma function