update part of the code that generates the monte carlo plots