Changed distribution functions;
Write integral method.