fixed monte carlo. fixed dbanalysis. added ntrials to flux_tool