write in db corrected