Try out finalize function