made fapply
addded distance distribution