Monte-Carlo fuctions added