Added some monte-carlo method testing code