Added funtions for MC sum