prepare for run