update owrite.cpp