update mente-carlo for calculate pai