[WIP] commonize code of DONE and DOING