prepare for finish