adding duration_multiplier to to_trials, and fixing bug in utils