finalize as promise