Monte carlo method for integration