a bit of refactoring...still need to finish the monte-carlo class