write finally works