Added distribution functions. Added SecondValue and ThirdValue as
parameters to some of the functions.