save func finish