implemented zsource integral given a zs distribution with or without probabilities.