finalize before submission