added sampling from truncated exponential distribution