restructured code to separate running trials, added ml estimation and spreading over irregular random trees