changed the scheme of plan inheritance
define util functions during analysis proc call
save params to json file at the beginning of each trial
define analysis util function
small fix